﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ShuiBiaoXXCX.aspx.cs" Inherits="Web.Pages.QuShui.DiXiaS.ChaXunGL.ShuiBiaoXXCX" Theme="Default"%>


<%--<asp:Content ID="Content1" ContentPlaceHolderID="ContentHolder" Runat="Server">--%>

<%@ Register Assembly="DevExpress.Web.v15.2, Version=15.2.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web" TagPrefix="dx" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <script src="../../../../JS/jquery.js" type="text/javascript"></script>
    <script src="../../../../JS/AddEditCancel.js" type="text/javascript"></script>
    <link href="../../../../css/inputBgColor.css" rel="stylesheet" />
    <style type="text/css">
        body, html {
            padding: 0;
            margin: 0;
            font-size:12px;
        }

        #img table tr td div {
            cursor: pointer;
        }


    </style>
    <script type="text/javascript">
        $(function () {
            var height = Math.max(0, document.documentElement.clientHeight) - 90;
            // $("#condition").css("height", height);
        });



        function rowClick() {
            if (gvShuiBiaoXX.GetFocusedRowIndex() != -1) {
                //alert(gvShuiBiaoXX.GetRowKey(gvShuiBiaoXX.GetFocusedRowIndex()));
                if (gvShuiBiaoXX.GetFocusedRowIndex() != -1) {
                    hdCollection.Set("ID", gvShuiBiaoXX.GetRowKey(gvShuiBiaoXX.GetFocusedRowIndex()));
                    //loadpanel1.Show();
                    ASPxCallback1.PerformCallback("setinfo");
                }
            }
        }

        function ASPxCallback1Complete(rs) {
            var arr = rs.split('|');
            var type = arr[0];
            var state = arr[1];
            if (type == "setinfo") {
                txtYongHuH2.SetText(arr[2]);
                txtYongHuM2.SetText(arr[3]);
                txtHuanNeiHW.SetText(arr[4]);
                txJingBianH.SetText(arr[5]);
                txtDiZhi.SetText(arr[6]);
                txtXingZhengQ.SetText(arr[7]);
                txShuiJia.SetText(arr[8]);
                txtQuShuiDZ2.SetText(arr[9]);
                txtShuiBiaoBH2.SetText(arr[10]);
                txtShuiLiangLB.SetText(arr[11]);
                txtCeHao.SetText(arr[12]);
                txtBiaoBiaoJ.SetText(arr[13]);
                txtBiaoFenL.SetText(arr[14]);
                txtZongBiaoH.SetText(arr[15]);
                memoBeiZhu.SetText(arr[16]);
            }
        }

        function OpenDia() {
            var sbh = txtShuiBiaoBH2.GetText();
            openCenter("../2.YongHuGL/BiaoXinXWH.aspx?sbh=" + sbh, "800px", "500px");
        }
        function XSorYC() {
            $("#divInfo").toggle();
            if ($("#divInfo").css('display') == 'none') {
                AdjustSize(150, gvShuiBiaoXX);
            }
            else {
                AdjustSize(400, gvShuiBiaoXX);
            }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
        <div class="tabletitle1" align="center">
            水表信息查询
        </div>
        <div style="display: none;">
            <dx:ASPxHiddenField ID="hdCollection" ClientInstanceName="hdCollection" runat="server"></dx:ASPxHiddenField>
            <dx:ASPxCallback ID="ASPxCallback1" ClientInstanceName="ASPxCallback1" runat="server" OnCallback="ASPxCallback1_Callback" ClientSideEvents-CallbackComplete="function(s,e){ASPxCallback1Complete(e.result);}"></dx:ASPxCallback>
        </div>
        <asp:UpdatePanel ID="updatePanel1" runat="server">
            <ContentTemplate>
                <div>
                    <div style="border: 1px solid #d0e4fe">
                        <table>
                            <tr>
                                 <td style="width:7%;"><span style="font-size: 12px;">水量年月：</span></td>
                                <td>
                                    <dx:ASPxTextBox runat="server" ID="txtShuiLiangYM"  Width="45%" ClientInstanceName="txtShuiLiangYM">
                                        <ClientSideEvents KeyUp="function(s,e){inputNum(s);}" />
                                    </dx:ASPxTextBox>
                                </td>
                               
                                <td>&nbsp;</td>
                                <td style="width:7%;"><span style="font-size: 12px;">环内环外：</span></td>
                                <td>
                                    <asp:Panel runat="server" ID="Panel1">
                                        <dx:ASPxComboBox runat="server" ID="cmbHuanNeiHW" Width="60%" AutoPostBack="false">
                                            <Items>
                                                <dx:ListEditItem Text="" Value="0" />
                                                <dx:ListEditItem Text="外环线内" Value="1" />
                                                <dx:ListEditItem Text="外环线外" Value="2" />
                                            </Items>
                                        </dx:ASPxComboBox>
                                    </asp:Panel>
                                </td>
                                <td style="width:6%;"><span style="font-size: 12px;">行政区：</span></td>
                                <td>
                                    <asp:Panel runat="server" ID="Panel2">
                                        <dx:ASPxComboBox runat="server" ID="cmbXingZhengQ" Width="60%">
                                            <Items>
                                                <dx:ListEditItem Text="全部" Value="0" Selected="true"  />
                                            </Items>
                                        </dx:ASPxComboBox>
                                    </asp:Panel>
                                </td>
                                <td style="width:6%;"><span style="font-size: 12px;">业务员：</span></td>
                                <td>
                                    <asp:Panel runat="server" ID="Panel3">
                                        <dx:ASPxComboBox runat="server" ID="cmbYeWuY" Width="60%">
                                            
                                        </dx:ASPxComboBox>
                                    </asp:Panel>
                                </td>
                               <td>&nbsp;&nbsp;</td>
                                <td>
                                    <dx:ASPxLoadingPanel runat="server" ID="LoadPanel11" ClientInstanceName="LoadPanel" Text="正在查询"></dx:ASPxLoadingPanel>
                                    <dx:ASPxButton runat="server" ID="btnChaXun" Text="查询" OnClick="btnChaXun_Click">
                                        <ClientSideEvents Click="function(s,e){LoadPanel.Show();}"/>
                                    </dx:ASPxButton>
                                </td>
                                 <td>
                                      <dx:ASPxButton runat="server" ID="btnXiuGai" Text="修改"  Visible="false" UseSubmitBehavior="false">
                                        <ClientSideEvents Click="function(s,e){OpenDia();}"/>
                                    </dx:ASPxButton>  
                                </td> 
                                 <td>
                                    <dx:ASPxButton ID="btnExport2" runat="server"  Text="导出EXCEL"  UseSubmitBehavior="false">
                                        <ClientSideEvents Click="function(s,e){btnExport.OnClick();}"/>
                                    </dx:ASPxButton>
                                </td>  
                                
                            </tr>
                        </table>
                    </div>
                    <div>
                        <fieldset style="border: 1px solid #d0e4fe">
                            <legend>查询条件</legend>
                            <div>
                                <div style="float: left; border: 1px solid #d0e4fe; width: 15%;" id="condition">
                                    <table style="height: 270px; width: 100%;">
                                        <tr>
                                            <td>
                                                <dx:ASPxRadioButton runat="server" ID="chkYongHuH" Checked="false" Text="用户号" ClientInstanceName="chkYongHuH" GroupName="1"></dx:ASPxRadioButton>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <dx:ASPxTextBox runat="server" ID="txtYongHuH" Width="80%">
                                                    <ClientSideEvents GotFocus="function(s,e){chkYongHuH.SetChecked(true);}" />
                                                </dx:ASPxTextBox>
                                            </td>
                                        </tr>
                                         <tr>
                                            <td>
                                                <dx:ASPxRadioButton runat="server" ID="rabJingBianH" Text="" GroupName="1" ClientInstanceName="rabJingBianH"></dx:ASPxRadioButton>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <dx:ASPxTextBox runat="server" ID="txtJingBianH" Width="100%">
                                                    <ClientSideEvents GotFocus="function(s,e){rabJingBianH.SetChecked(true);}" />
                                                </dx:ASPxTextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <dx:ASPxRadioButton runat="server" ID="rabShuiBiaoBH" Text="水表编号" GroupName="1" ClientInstanceName="rabShuiBiaoBH"></dx:ASPxRadioButton>
                                            </td>
                                        </tr> 
                                         <tr>
                                            <td>
                                                <dx:ASPxTextBox runat="server" ID="txtShuiBiaoBH" Width="100%">
                                                    <ClientSideEvents GotFocus="function(s,e){rabShuiBiaoBH.SetChecked(true);}" />
                                                </dx:ASPxTextBox>
                                            </td>
                                        </tr> 
                                        <tr>
                                            <td>
                                                <dx:ASPxRadioButton runat="server" ID="chkYongHuM" Text="用户名" GroupName="1" ClientInstanceName="chkYongHuM"></dx:ASPxRadioButton>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <dx:ASPxTextBox runat="server" ID="txtYongHuM" Width="100%">
                                                    <ClientSideEvents GotFocus="function(s,e){chkYongHuM.SetChecked(true);}" />
                                                </dx:ASPxTextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <dx:ASPxRadioButton runat="server" ID="chkYongHuDZ" Text="用户地址" GroupName="1" ClientInstanceName="chkYongHuDZ"></dx:ASPxRadioButton>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <dx:ASPxTextBox runat="server" ID="txtYongHuDZ" Width="100%">
                                                    <ClientSideEvents GotFocus="function(s,e){chkYongHuDZ.SetChecked(true);}" />
                                                </dx:ASPxTextBox>
                                            </td>
                                        </tr>
                                        
                                         <tr>
                                            <td>
                                                <dx:ASPxRadioButton runat="server" ID="rabQuShuiDZ" Text="取水地址" GroupName="1" ClientInstanceName="rabQuShuiDZ"></dx:ASPxRadioButton>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <dx:ASPxTextBox runat="server" ID="txtQuShuiDZ" Width="100%">
                                                    <ClientSideEvents GotFocus="function(s,e){rabQuShuiDZ.SetChecked(true);}" />
                                                </dx:ASPxTextBox>
                                            </td>
                                        </tr> 
                                        
                                    </table>
                                   

                                </div>
                            </div>
                            <div style="float: right; border: 1px solid #d0e4fe; width: 84%;">
                                <div id="img">
                                    <table>
                                        <tr>
                                            <td>
                                                <dx:ASPxLabel ID="zjl" Text="共0条" runat="server" ForeColor="Blue"></dx:ASPxLabel>
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                                <div>
                                    <%--<dx:ASPxProgressBar></dx:ASPxProgressBar>--%>

                                     <%--<dx:ToolbarExport runat="server" ID="ToolbarExport" ExportItemTypes="Pdf,Xls,Xlsx,Rtf,Csv" OnItemClick="ToolbarExport_ItemClick" />--%> 

                                    <dx:ASPxGridView ID="gvShuiBiaoXX" ClientInstanceName="gvShuiBiaoXX" runat="server" AutoGenerateColumns="False" KeyFieldName="ID" 
                                        ClientIDMode="AutoID" Settings-ShowVerticalScrollBar="true" Width="100%"   EnableCallBacks="true"
                                         SettingsBehavior-AllowSort="true" >
                                        <Columns>
                                             <dx:GridViewDataTextColumn FieldName="S_SHUIBIAOBH" Caption="水表编号" Width="80">
                                            </dx:GridViewDataTextColumn>
                                             <dx:GridViewDataTextColumn FieldName="S_QUSHUIK" Caption="井编号" Width="60">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn FieldName="S_YONGHUH" Caption="用户号" Width="60">
                                            </dx:GridViewDataTextColumn>
                                             <dx:GridViewDataTextColumn FieldName="S_CEHAO" Caption="册号" Width="60">
                                            </dx:GridViewDataTextColumn>
                                             <dx:GridViewDataTextColumn FieldName="S_SHUILIANGLB" Caption="水量类别" Width="70">
                                            </dx:GridViewDataTextColumn>
                                             <dx:GridViewDataTextColumn FieldName="N_SHUIJIA" Caption="水价" Width="60" PropertiesTextEdit-DisplayFormatString="0.00">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn FieldName="S_YONGHUM" Caption="用户名" Width="200">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn FieldName="S_DIZHI" Caption="用户地址" Width="200">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn FieldName="S_JINGDIZ" Caption="取水地址" Width="200">
                                            </dx:GridViewDataTextColumn>
                                             <dx:GridViewDataTextColumn FieldName="HNHW" Caption="环线内外" Width="60">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn FieldName="S_XINGZHENGQBH" Caption="行政区号" Width="60">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn FieldName="S_XINGZHENGQM" Caption="行政区名" Width="60">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn FieldName="S_YEWUY" Caption="业务员" Width="60">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn FieldName="S_ZONGBIAOH" Caption="总表号" Width="">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn FieldName="S_BIAOFENL" Caption="表分类" Width="">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn FieldName="S_BIAOBIAOJ" Caption="表标记" Width="">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn FieldName="S_BEIZHU" Caption="备注" Width="200">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn FieldName="D_CAOZUORQ" Caption="修改日期" Width="85" PropertiesTextEdit-DisplayFormatString="yyyy-MM-dd">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn FieldName="S_KAISHINY" Caption="增表日期" Width="85" >
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn FieldName="" Caption="销表日期" Width="85" PropertiesTextEdit-DisplayFormatString="yyyy-MM-dd">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn FieldName="S_QUSHUIKPH" Caption="取水口标牌号" Width="85" >
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn FieldName="" Caption="计量表标牌号" Width="85" >
                                            </dx:GridViewDataTextColumn>
                                        </Columns>
                                        <Settings VerticalScrollBarMode="Visible"  HorizontalScrollBarMode="Auto" />
                                        <SettingsPager   Mode="EndlessPaging" PageSize="100"  />
                                        <Settings ShowFooter="True" />
                                        <SettingsBehavior AllowFocusedRow="True"  ColumnResizeMode="Control" />
                                        <ClientSideEvents FocusedRowChanged="function(s,e){rowClick();}" />
                                        <SettingsBehavior ProcessFocusedRowChangedOnServer="false" />
                                        <ClientSideEvents Init="function(s,e){AdjustSize(450,gvShuiBiaoXX);}"  />
                                    </dx:ASPxGridView>
                                    
                                    <%--
                                    <ef:entitydatasource runat="server" id="CustomerReportsDataSource" contexttypename="NorthwindContext" entitysetname="CustomerReports" />--%>

                                </div>
                                <div>
                                     <input type="button" id="yc" value="隐藏或显示详情" name="btnTest" onclick="XSorYC()"/>
                                </div>
                                <br />
                                <hr />
                                <div id="divInfo">
                                    <table style="text-align: right;  width: 100%;">
                                        <tr>
                                            <td style="width:10%;"><span style="font-size: 12px;">用户号：</span></td>
                                            <td>
                                                <dx:ASPxTextBox runat="server" ID="txtYongHuH2"  ClientEnabled="false" Width="80%"  ClientInstanceName="txtYongHuH2"></dx:ASPxTextBox>
                                            </td>
                                            <td style="width:10%;"><span style="font-size: 12px;">用户名：</span></td>
                                            <td colspan="3">
                                                <dx:ASPxTextBox runat="server" ID="txtYongHuM2"  ClientEnabled="false"  Width="100%" ClientInstanceName="txtYongHuM2"></dx:ASPxTextBox>
                                            </td>
                                               <td style="width:10%;"><span style="font-size: 12px;">环内环外：</span></td>
                                            <td>
                                                <dx:ASPxTextBox runat="server" ID="txtHuanNeiHW"  ClientEnabled="false"  Width="100%" ClientInstanceName="txtHuanNeiHW"></dx:ASPxTextBox>
                                            </td>  
                                        </tr>
                                         <tr>
                                             <td><span style="font-size: 12px;">水价：</span></td>
                                            <td>
                                                <dx:ASPxTextBox runat="server" ID="txShuiJia" ClientEnabled="false"  Width="80%" ClientInstanceName="txShuiJia" DisplayFormatString="0.00"></dx:ASPxTextBox>
                                            </td>
                                            <td><span style="font-size: 12px;">地址：</span></td>
                                            <td colspan="3">
                                                <dx:ASPxTextBox runat="server" ID="txtDiZhi" ClientEnabled="false"  Width="100%" ClientInstanceName="txtDiZhi"></dx:ASPxTextBox>
                                            </td>  
                                            
                                            <td><span style="font-size: 12px;">行政区：</span></td>
                                            <td>
                                                <dx:ASPxTextBox runat="server" ID="txtXingZhengQ" ClientEnabled="false"  Width="100%" ClientInstanceName="txtXingZhengQ"></dx:ASPxTextBox>
                                            </td>
                                        </tr> 
                                         <tr>
                                             <td><span id="jbh" runat="server" style="font-size: 12px;"></span></td>
                                            <td>
                                                <dx:ASPxTextBox runat="server" ID="txJingBianH" ClientEnabled="false"  Width="80%" ClientInstanceName="txJingBianH"></dx:ASPxTextBox>
                                            </td>
                                            <td><span style="font-size: 12px;">取水地址：</span></td>
                                            <td colspan="3">
                                                <dx:ASPxTextBox runat="server" ID="txtQuShuiDZ2" ClientEnabled="false"  Width="100%" ClientInstanceName="txtQuShuiDZ2"></dx:ASPxTextBox>
                                            </td> 
                                        </tr> 
                                        <tr>
                                              <td style="width:10%;"><span style="font-size: 12px;">水表编号：</span></td>
                                            <td>
                                                <dx:ASPxTextBox runat="server" ID="txtShuiBiaoBH2" ClientEnabled="false"  Width="80%" ClientInstanceName="txtShuiBiaoBH2"></dx:ASPxTextBox>
                                            </td> 
                                            <td><span style="font-size: 12px;">水量类别：</span></td>
                                            <td colspan="3">
                                                <dx:ASPxTextBox runat="server" ID="txtShuiLiangLB" ClientEnabled="false"  Width="100%" ClientInstanceName="txtShuiLiangLB"></dx:ASPxTextBox>
                                            </td>
                                            <td><span style="font-size: 12px;">册号：</span></td>
                                            <td>
                                                <dx:ASPxTextBox runat="server" ID="txtCeHao" ClientEnabled="false"  Width="100%" ClientInstanceName="txtCeHao"></dx:ASPxTextBox>
                                            </td>
                                           
                                        </tr>
                                        <tr>
                                            <td><span style="font-size: 12px;">表标记：</span></td>
                                            <td>
                                                <dx:ASPxTextBox runat="server" ID="txtBiaoBiaoJ" ClientEnabled="false"  Width="80%" ClientInstanceName="txtBiaoBiaoJ"></dx:ASPxTextBox>
                                            </td>
                                             <td><span style="font-size: 12px;">表分类：</span></td>
                                            <td>
                                                <dx:ASPxTextBox runat="server" ID="txtBiaoFenL" ClientEnabled="false"  Width="80%" ClientInstanceName="txtBiaoFenL"></dx:ASPxTextBox>
                                            </td>
                                                <td><span style="font-size: 12px;">总表号：</span></td>
                                            <td>
                                                <dx:ASPxTextBox runat="server" ID="txtZongBiaoH" ClientEnabled="false"  Width="100%" ClientInstanceName="txtZongBiaoH"></dx:ASPxTextBox>
                                            </td>
                                               
                                        </tr>
                                         <tr>
                                             <td  rowspan="2"><span style="font-size: 12px;">备注：</span></td>
                                            <td rowspan="2" colspan="3">
                                                <dx:ASPxMemo runat="server" ID="memoBeiZhu"  ClientEnabled="false"  Width="100%" ClientInstanceName="memoBeiZhu"></dx:ASPxMemo>
                                            </td> 
                                        </tr>
                                       
                                    </table>
                                </div>
                            </div>
                        </fieldset>
                    </div>
                </div>
            </ContentTemplate>
        </asp:UpdatePanel>
        
          <div style="display: none;">
            <dx:ASPxGridViewExporter ID="ASPxGridViewExporter1" runat="server"></dx:ASPxGridViewExporter>
            <dx:ASPxButton ID="btnExport" runat="server" ClientInstanceName="btnExport" Text="导出EXCEL" OnClick="btnExport_Click" UseSubmitBehavior="false">
            </dx:ASPxButton>
        </div> 
    </form>
</body>
</html>

